package com.clinic.entity.gui;

import java.util.Date;

import com.clinic.entity.type.TreatmentTime;

public class GuiDrugIssue {
	
	private long drugIssueId;
	private GuiDrug drug;
	private int termsPerDay;
	private int noOfDays;
	private int amount;
	private TreatmentTime treatmentTime;
	private boolean issue;
	private Date date;
	private GuiPrescription prescription;
	
	public boolean isAvailable() {
		return (drug != null && termsPerDay > 0);
	}

	public long getDrugIssueId() {
		return drugIssueId;
	}

	public void setDrugIssueId(long drugIssueId) {
		this.drugIssueId = drugIssueId;
	}

	public GuiDrug getDrug() {
		return drug;
	}

	public void setDrug(GuiDrug drug) {
		this.drug = drug;
	}

	public int getTermsPerDay() {
		return termsPerDay;
	}

	public void setTermsPerDay(int termsPerDay) {
		this.termsPerDay = termsPerDay;
	}

	public int getNoOfDays() {
		return noOfDays;
	}

	public void setNoOfDays(int noOfDays) {
		this.noOfDays = noOfDays;
	}

	public int getAmount() {
		return amount;
	}

	public void setAmount(int amount) {
		this.amount = amount;
	}

	public TreatmentTime getTreatmentTime() {
		return treatmentTime;
	}

	public void setTreatmentTime(String id) {
		this.treatmentTime = TreatmentTime.getValueById(id);
	}

	public boolean isIssue() {
		return issue;
	}

	public void setIssue(boolean issue) {
		this.issue = issue;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public GuiPrescription getPrescription() {
		return prescription;
	}

	public void setPrescription(GuiPrescription prescription) {
		this.prescription = prescription;
	}

}
